package org.gfids.trivial.model.servidor;

import java.net.ServerSocket;
import java.net.Socket;


public class Servidor {

   Servidor() throws Exception {
       ServerSocket ss = new ServerSocket(7777);
       Socket s;
       System.out.println("Creado Servidor!!!");
       while (true) {
           System.out.println("SERVIDOR ---> Esperando conexion...");
           s = ss.accept();
           System.out.println("SERVIDOR ---> Usuario conectado!");
           Hilo h = new Hilo(s);
           h.start();           
       }
   }

   public static void main(String[] args) throws Exception {
       new Servidor();
   }
}
